//
//  SaleDetailFinishViewController.m
//  PigMarket
//
//  Created by 张敬 on 2019/8/21.
//  Copyright © 2019年 pigmarket.oc. All rights reserved.
//

#import "SaleDetailFinishViewController.h"
#import "SaleFinishCell.h"


@interface SaleDetailFinishViewController ()

@end

@implementation SaleDetailFinishViewController

#pragma mark - view life cycle

#pragma mark - init method
- (void)setupUI {
    
    {
        self.baseNavView.navTitleLabel.text = @"出售明细";
        self.baseNavView.navTitleLabel.textColor = KWhiteColor;
        
        UIImage *image = [UIImage imageNamed:@"meat_question_nav"];
        self.baseNavView.layer.contents =  (__bridge id)image.CGImage;
    }
    
    {
        [self.baseNavView.leftNavBtn setImage:[UIImage imageNamed:@"nav_white"] forState:UIControlStateNormal];
    }
    
    {
    }
    
}


- (void) setupLayout
{
    
}


- (void)initData
{
    
}

#pragma mark - delegate

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 5;
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 1;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 151;
}


- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 0;
}


- (nullable UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    
    return [UIView new];
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 5;
}


- (nullable UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
    
    return  [UIView new];
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    SaleFinishCell *cell = [tableView  dequeueReusableCellWithIdentifier:@"SaleFinishCell"];
    cell.type = indexPath.section %2 == 0 ?SaleFinishCellType_Time :SaleFinishCellType_Location;
    return cell;
}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    
}


#pragma mark - getter and setter

- (void)registerTableViewCell
{
    self.tableView.height = KScreenHeight - TJ_NavBarHeight;
    self.tableView.mj_y = TJ_NavBarHeight + 10;
    self.tableView.separatorColor = mIconLineColor;
    [self.tableView registerClass:[SaleFinishCell class] forCellReuseIdentifier:@"SaleFinishCell"];
}


@end
